package chris.config;

import org.springframework.amqp.core.AnonymousQueue;
import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * AnonymousQueueConfig
 *
 * @author nanxin.chen
 * @since 2017/7/5
 */
@Configuration
public class AnonymousQueueConfig {

    @Bean
    public Queue anon1() {
        return new AnonymousQueue(new AnonymousQueue.Base64UrlNamingStrategy());
    }

    @Bean
    public Queue anon2() {
        return new AnonymousQueue(new AnonymousQueue.Base64UrlNamingStrategy("chris-"));
    }

}
